﻿<UserControl x:Class="BillsManager.Views.SendFeedbackView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Loc="clr-namespace:BillsManager.Localization;assembly=BillsManager.Localization"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             MinWidth="400"
             MinHeight="200"
             d:DesignHeight="200"
             d:DesignWidth="300"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="/BillsManager.Views;component/Dictionaries/Styles.xaml" />-->
        <ResourceDictionary Source="/BillsManager.Views;component/Themes\Themes.xaml" />
    </UserControl.Resources>

    <UserControl.Background>
        <Binding Mode="OneTime" Source="{StaticResource View.Background}" />
    </UserControl.Background>


    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
            <ColumnDefinition Width="Auto" MinWidth="75" />
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
            <ColumnDefinition />
            <ColumnDefinition Width="{StaticResource View.MarginSize}" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="{StaticResource View.MarginSize}" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.MarginSize}" />
            <RowDefinition />
            <RowDefinition Height="{StaticResource View.Region.Spacing.Medium}" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.MarginSize}" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="1"
                   Grid.Column="1"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Text="{Loc:Translate Subject}" />
        <TextBox Grid.Row="1"
                 Grid.Column="3"
                 MaxLines="1"
                 Text="{Binding Subject,
                                UpdateSourceTrigger=PropertyChanged}" />

        <TextBlock Grid.Row="3"
                   Grid.Column="1"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Text="{Loc:Translate Message}" />
        <TextBox Grid.Row="3"
                 Grid.Column="3"
                 AcceptsReturn="True"
                 AcceptsTab="True"
                 HorizontalScrollBarVisibility="Auto"
                 Text="{Binding Message,
                                UpdateSourceTrigger=PropertyChanged}"
                 VerticalScrollBarVisibility="Auto" />

        <StackPanel Grid.Row="5"
                    Grid.Column="1"
                    Grid.ColumnSpan="3"
                    HorizontalAlignment="Right"
                    Orientation="Horizontal">

            <CheckBox VerticalAlignment="Center"
                      Content="{Loc:Translate CloseAfterSend}"
                      IsChecked="{Binding CloseAfterSend}">
                <CheckBox.Margin>
                    <Thickness Right="{StaticResource View.MarginSize.Value}" />
                </CheckBox.Margin>
            </CheckBox>

            <Button MinWidth="80"
                    Command="{Binding SendFeedbackCommand}"
                    Content="{Loc:Translate SendFeedback}">
                <Button.Margin>
                    <Thickness Right="{StaticResource View.MarginSize.Value}" />
                </Button.Margin>
            </Button>

            <Button MinWidth="80"
                    Command="{Binding CancelCommand}"
                    Content="{Loc:Translate Cancel}" />
        </StackPanel>

    </Grid>
</UserControl>
